<form>
    <fieldset>
        <legend></legend>
        <table id="dataTable">
            <thead>
            <tr>
                <th>ID</th>
                <th>所属商家</th>
                <th>商品名</th>
                <th>登记人用户名</th>
                <th>购买者姓名</th>
                <th>购买者电话</th>
                <th>类型</th>
                <th>当前状态</th>
                <th>解禁时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($r['record'] as $v){?>
                <tr>
                    <td><?php echo $v['id']?></td>
                    <td><?php echo $v['gopen_id']?></td>
                    <td><?php echo $v['user_id']?></td>
                    <td><?php echo $v['username']?></td>
                    <td><?php echo $v['name']?></td>
                    <td><?php echo $v['tel']?></td>
                    <td><?php foreach($r['recordState'] as $k=>$s){?>
                    <?php if($k==$v['type']) echo $s?>
                    <?php } ?></td>
                    <td><?php foreach($r['currentState'] as $k=>$s){?>
                            <?php if($k==$v['state']) echo $s?>
                        <?php } ?></td>
                    <?php if($v['state']=='waiting'||$v['state']=='saw'){?>
                        <td><?php echo $v['create_time']?></td>
                    <?php }else{?>
                        <td></td>
                    <?php }?>
                    <td><a href="<?php e_action("recordDelete","id={$v['id']}");?>">删除</a></td>
                </tr>
            <?php }?>
            </tbody>
        </table>
    </fieldset>
</form>
<?php
/** @var Page $page */
$page=$r['pages'];
?>
<?php echo $page->getPageHtml(); ?>